import request from '@/utils/request'

// 查询预约接种记录列表
export function listAppointmentVaccination(query) {
  return request({
    url: '/appointment/appointmentVaccination/list',
    method: 'get',
    params: query
  })
}

// 查询预约接种记录详细
export function getAppointmentVaccination(recordId) {
  return request({
    url: '/appointment/appointmentVaccination/' + recordId,
    method: 'get'
  })
}

// 新增预约接种记录
export function addAppointmentVaccination(data) {
  return request({
    url: '/appointment/appointmentVaccination',
    method: 'post',
    data: data
  })
}

// 修改预约接种记录
export function updateAppointmentVaccination(data) {
  return request({
    url: '/appointment/appointmentVaccination',
    method: 'put',
    data: data
  })
}

// 删除预约接种记录
export function delAppointmentVaccination(recordId) {
  return request({
    url: '/appointment/appointmentVaccination/' + recordId,
    method: 'delete'
  })
}

// 取消预约
export function cancelAppointment(recordId) {
  return request({
    url: '/appointment/appointmentVaccination/cancel/' + recordId,
    method: 'put'
  })
}

// 接种
export function vaccinate(data) {
  return request({
    url: '/appointment/appointmentVaccination/vaccinate',
    method: 'put',
    data: data
  })
}
